package com.demo.kafka;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.KafkaListener;

/**
 * @author wangfengchen
 */
@Slf4j
@Configuration
public class KafkaConsumer {
    @KafkaListener(topics = "kafkaTopic")
    public void consumerTopic(String msg){
        log.info("kafka消费者收到消息，msg = {}", msg);
    }
}